package cn.wolfcode.crm.util;


import cn.wolfcode.crm.domain.Employee;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;

import javax.servlet.http.HttpSession;


public abstract class UserContext {
        //获取当前登录对象
        public static Employee getCurrentUser () {
            return (Employee) SecurityUtils.getSubject().getPrincipal();
        }

        //返回session对象
        public static Session getSession () {
            return  SecurityUtils.getSubject().getSession();
        }


    }

